package com.mnsq.common.bean.enums;

/**
 * 注册、登录方式
 *
 * @author Administrator
 * @date 2019/3/18 0018
 */
public enum RegisterType {
    PASSWORD(0, "账号密码"), EMAIL(1, "邮箱"), MOBILE_PHONE(2, "手机"), W_CHAT(3, "微信"), QQ(4, "QQ"), W_BO(5, "微博"), ALI(6, "阿里");

    private Integer type;
    private String name;

    RegisterType(Integer type, String name) {
        this.type = type;
        this.name = name;
    }

    public static String getName(Integer type) {
        for (RegisterType rt : RegisterType.values()) {
            if (rt.type.equals(type)) {
                return rt.name;
            }
        }
        return "未知";
    }
}
